package dao;

import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.Date;

import entities.Apartamento;
import entities.Condominio;
import exceptions.AnoInvalidoException;
import exceptions.CampoVazioException;
import exceptions.CondominioNaoEncontradoException;
import exceptions.DataInvalidaException;
import exceptions.DiaInvalidoException;
import exceptions.DiaLimiteComporCondException;
import exceptions.ValorMonetarioInvalidoException;

public interface CondominioDAO {

	public Condominio abrirCaixaCondominio(String mes, String ano, String vlrInicial, String diaVencimento,
			boolean isAberto, String diaLimite,int qntAptosAlugados,  Connection connection) throws SQLException, CampoVazioException,
			DiaInvalidoException, ValorMonetarioInvalidoException, AnoInvalidoException, DiaLimiteComporCondException;

	public Condominio fecharCaixaCondominio(Condominio condominio, Connection connection) throws SQLException, NumberFormatException, CampoVazioException, DiaInvalidoException, ValorMonetarioInvalidoException, DiaLimiteComporCondException, ParseException;

	public void cadastrarDespesaCondominio(Condominio condominio, String categoria, String subcategoria, String descricao,
			String valor, String dataDebito, boolean comporVlrCond, Connection connection)
	throws SQLException, ValorMonetarioInvalidoException, CampoVazioException, ParseException, DataInvalidaException;

	public double liquidaDebitosCondominio(String ids, String mes, String ano, Connection connection) throws SQLException, ParseException;

	public Condominio recuperaCondominio(String ano, String mes, Connection connection) throws SQLException;

	public void gerarValorCondominio(Condominio condominio, Connection connection) throws SQLException, ParseException, IOException;

	public Condominio recuperaCondAberto(Connection connection) throws SQLException;

	public void atualizaCondominio(Condominio condominio, Connection connection) throws SQLException;

	public boolean jaFoiGerado(Condominio condominio, Connection connection) throws SQLException;

	public ResultSet recuperaAptosAtrasados(Date data, boolean isAluguel, Connection connection) throws SQLException;

	public ResultSet listarDebitosCondominio(String dataLimite,
			Connection connection) throws DataInvalidaException, CampoVazioException, SQLException, ParseException;

	public void cadastrarMultaJurosCond(String mes, String ano, String valor, Connection connection) throws SQLException,ParseException, CondominioNaoEncontradoException;

	public double recuperaValorMensalidade(Apartamento apartamento,
			String dataVencimento, boolean isAluguel, boolean isAtivo, Connection connection) throws SQLException, ParseException;


}
